Function Reference

_GUICtrlStatusBarSetTip

Sets the ToolTip text for a part in a status bar.

#Include <GuiStatusBar.au3>
_GUICtrlStatusBarSetTip($h_StatusBar, $i_part, $s_ToolTip)

 

Parameters

$h_StatusBar Handle to statusbar
$i_part Zero-based index of the part that will receive the ToolTip text
$s_ToolTip new ToolTip text

 

Return Value

None.

 

Remarks

The status bar must be created with the $SBT_TOOLTIPS style to enable ToolTips.

This ToolTip text is displayed in two situations:

    When the corresponding pane in the status bar contains only an icon.
    When the corresponding pane in the status bar contains text that is truncated due to the size of the pane.

 

Related

_GUICtrlStatusBarCreate, _GUICtrlStatusBarGetTip

 

Example


opt("MustDeclareVars", 1)

#include <GUIConstants.au3>
#Include <GuiStatusBar.au3>

Local $gui, $StatusBar1, $msg
Local $a_PartsRightEdge[3] = [100, 200, -1]
Local $a_PartsText[3] = ["", "Force tip to be shown when text is more than fits in the box", "Even More Text"]

$gui = GUICreate("Status Bar Set Tip", 500, -1, -1, -1, $WS_SIZEBOX)

$StatusBar1 = _GUICtrlStatusBarCreate ($gui, $a_PartsRightEdge, $a_PartsText, $SBT_TOOLTIPS)
_GUICtrlStatusBarSetIcon($StatusBar1, 0, "shell32.dll", 21)
_GUICtrlStatusBarSetTip($StatusBar1, 0, "Tip works when only icon in part or text exceeds part")
_GUICtrlStatusBarSetTip($StatusBar1, 1, "Force tip to be shown when text is more than fits in the box")
_GUICtrlStatusBarSetTip($StatusBar1, 2, "Part 3")

GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_RESIZED
            _GUICtrlStatusBarResize ($StatusBar1)
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
            ;;;;;
    EndSelect
   
WEnd